import {lazy} from "react"

import TabBer from "../pages/tabBer"
// 进阶写法 路由懒加载
const Home = lazy(()=>import("../pages/Home/index"))
const Goods = lazy(()=>import("../pages/Goods/Goods"))
const Life = lazy(()=>import("../pages/life/life"))
const My = lazy(()=>import("../pages/My/My"))
const Login = lazy(()=>import("../pages/Login/index"))
const House = lazy(()=>import("../pages/House/House"))

// 常规写法
// import Home from "../pages/Home/index"
// import Goods from "../pages/Goods/Goods"
// import Life from "../pages/life/Life"
// import My from "../pages/My/My"
// import Login from "../pages/Login/index"



let RouterArray = [
    {
        path:"/",
        element:<TabBer/>,
        children:[
        {index:true,element:<Home/>},
        {path:'goods',name:"Goods",element:<Goods/>},
        {path:'life',name:"Life",element:<Life/>},
        {path:'my',name:"My",element:<My/>},
        ]
    },
    {path:'login',name:"Login",element:<Login/>},
    {path:"house",name:'House',element:<House/>},
    
]

export default RouterArray
